from django.urls import path, register_converter

from apps.users import views
from utils.converters import UsernameConverter

register_converter(UsernameConverter, 'uname')
urlpatterns = [
    path('usernames/<uname:username>/count/', views.UsernameCountView.as_view()),
    path('register/', views.RegisterView.as_view()),
    path('login/', views.LoginView.as_view()),
    path('logout/', views.LogoutView.as_view()),
    path('info/', views.UserInfoView.as_view()),
    path('emails/', views.SaveEmailView.as_view()),
    path('emails/verification/', views.EmailVerifyView.as_view()),
    path('addresses/', views.AddressView.as_view()),
    path('addresses/create/', views.AddressCreateView.as_view()),
]
